home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / System7 tools / Frontier / Frontier SDK 2.1 / Toolkits / Applet Toolkit / appletkb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-11  |  1.1 KB  |  64 lines  |  [TEXT/KAHL]

  1.  
  2. /*© Copyright 1988-1991 UserLand Software, Inc.  All Rights Reserved.*/
  3.  
  4.  
  5. #define kbinclude /*so other includes can tell if we've been loaded*/
  6.  
  7.  
  8. #ifndef appletdefsinclude
  9.  
  10.     #include "appletdefs.h"
  11.     
  12. #endif
  13.  
  14.  
  15.  
  16.  
  17. typedef struct tykeystrokerecord {
  18.  
  19.     char chkb;
  20.     
  21.     boolean flshiftkey, flcmdkey, floptionkey, flalphalock, flcontrolkey;
  22.         
  23.     short ctmodifiers; /*the number of booleans that are on*/
  24.  
  25.     short keycode; /*see Toolbox Event Manager -- this is the hardware key code*/
  26.     
  27.     boolean flkeypad: 1; /*if true, keystroke comes from numeric keypad*/
  28.     
  29.     boolean flautokey: 1; /*if true, keystroke is an automatic key*/
  30.     
  31.     tydirection keydirection; 
  32.     } tykeystrokerecord, *ptrkeystrokerecord, **hdlkeystrokerecord;
  33.  
  34.  
  35. extern tykeystrokerecord keyboardstatus;
  36.  
  37.  
  38. tydirection keystroketodirection (char ch); 
  39.  
  40. boolean arrowkey (char);
  41.  
  42. tydirection keystroketodirection (char);
  43.  
  44. void setkeyboardstatus (EventRecord);
  45.  
  46. void keyboardclearescape (void);
  47.  
  48. void keyboardsetescape (void);
  49.  
  50. boolean keyboardescape (void);
  51.  
  52. void keyboardpeek (tykeystrokerecord *);
  53.  
  54. boolean enterkeydown (void);
  55.  
  56. boolean optionkeydown (void);
  57.  
  58. boolean cmdkeydown (void);
  59.  
  60. boolean shiftkeydown (void);
  61.  
  62.  
  63.  
  64.